package practice3;

import org.junit.Test;
import static org.junit.Assert.*;

public class AbstractArithmeticTest {
    @Test
    public void testAddition() {
        AbstractArithmetic add = new Addition(7, 3);
        assertEquals(10, add.getResult());
        assertEquals("7 + 3 = 10", add.toString());
    }

    @Test
    public void testSubtraction() {
        AbstractArithmetic sub = new Subtraction(9, 4);
        assertEquals(5, sub.getResult());
        assertEquals("9 - 4 = 5", sub.toString());
    }
}
